/* 群名称修改模态框样式 */
.edit-group-name-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.edit-group-name-modal {
  background: white;
  border-radius: 12px;
  width: 90%;
  max-width: 400px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid #e0e0e0;
}

.cancel-btn {
  background: green;
  border: none;
  color: #ffffff;
  font-size: 16px;
  cursor: pointer;
  padding: 8px;
  border-radius: 6px;
  transition: background-color 0.2s;
  width: 80px;
}

.cancel-btn:hover {
  background-color: #f0f0f0;
}

.modal-title {
  font-size: 18px;
  font-weight: 600;
  color: #000;
  margin: 0;
}

.save-btn {
  background: #007aff;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.save-btn:hover:not(:disabled) {
  background: #0056b3;
}

.save-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
}

.modal-content {
  padding: 20px;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.input-label {
  font-size: 16px;
  color: #333;
  font-weight: 500;
}

.group-name-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  font-size: 16px;
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.group-name-input:focus {
  border-color: #007aff;
}

.char-count {
  text-align: right;
  font-size: 12px;
  color: #999;
  margin-top: 4px;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .edit-group-name-modal {
    width: 95%;
    margin: 20px;
  }

  .modal-header {
    padding: 12px 16px;
  }

  .modal-title {
    font-size: 16px;
  }

  .modal-content {
    padding: 16px;
  }

  .group-name-input {
    font-size: 14px;
    padding: 10px 12px;
  }
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
  .edit-group-name-modal {
    background: #2c2c2e;
  }

  .modal-header {
    border-bottom-color: #3a3a3c;
  }

  .modal-title {
    color: #fff;
  }

  .input-label {
    color: #fff;
  }

  .group-name-input {
    background: #1c1c1e;
    border-color: #3a3a3c;
    color: #fff;
  }

  .group-name-input:focus {
    border-color: #007aff;
  }

  .char-count {
    color: #8e8e93;
  }
}
